Repetier-Firmware  1.0.0
ui.cpp File Reference
#include "Repetier.h"
#include "uimenu.h"
#include <math.h>
#include <stdlib.h>
#include <inttypes.h>
#include <ctype.h>

Macros

#define UI_MAIN   1
 
#define UI_ROWS_EXTRA   0
 
ENTRYMODES
#define LCD_ENTRYMODE   0x04
 
#define LCD_ENTRYMODE   0x04
 
#define LCD_INCREASE   LCD_ENTRYMODE | 0x02
 
#define LCD_DECREASE   LCD_ENTRYMODE | 0x00
 
#define LCD_DISPLAYSHIFTON   LCD_ENTRYMODE | 0x01
 
#define LCD_DISPLAYSHIFTOFF   LCD_ENTRYMODE | 0x00
 
GENERAL COMMANDS
#define LCD_CLEAR   0x01
 
#define LCD_HOME   0x02
 
DISPLAYMODES
#define LCD_DISPLAYMODE   0x08
 
#define LCD_DISPLAYON   LCD_DISPLAYMODE | 0x04
 
#define LCD_DISPLAYOFF   LCD_DISPLAYMODE | 0x00
 
#define LCD_CURSORON   LCD_DISPLAYMODE | 0x02
 
#define LCD_CURSOROFF   LCD_DISPLAYMODE | 0x00
 
#define LCD_BLINKINGON   LCD_DISPLAYMODE | 0x01
 
#define LCD_BLINKINGOFF   LCD_DISPLAYMODE | 0x00
 
SHIFTMODES
#define LCD_SHIFTMODE   0x10
 
#define LCD_DISPLAYSHIFT   LCD_SHIFTMODE | 0x08
 
#define LCD_CURSORMOVE   LCD_SHIFTMODE | 0x00
 
#define LCD_RIGHT   LCD_SHIFTMODE | 0x04
 
#define LCD_LEFT   LCD_SHIFTMODE | 0x00
 

Functions

void beep (uint8_t duration, uint8_t count)
 

Variables

static TemperatureController * currHeaterForSetup
 
millis_t ui_autoreturn_time = 0
 
UIDisplay uid
 

DISPLAY_CONFIGURATION

#define LCD_CONFIGURATION   0x20
 
#define LCD_8BIT   LCD_CONFIGURATION | 0x10
 
#define LCD_4BIT   LCD_CONFIGURATION | 0x00
 
#define LCD_2LINE   LCD_CONFIGURATION | 0x08
 
#define LCD_1LINE   LCD_CONFIGURATION | 0x00
 
#define LCD_5X10   LCD_CONFIGURATION | 0x04
 
#define LCD_5X7   LCD_CONFIGURATION | 0x00
 
#define LCD_SETCGRAMADDR   0x40
 
#define lcdPutChar(value)   lcdWriteByte(value,1)
 
#define lcdCommand(value)   lcdWriteByte(value,0)
 
#define INCREMENT_MIN_MAX(a, steps, _min, _max)   a = constrain((a + increment * steps), _min, _max);
 
const int8_t encoder_table [16] PROGMEM = {4, 14, 21, 4, 4, 4, 28, 0}
 
uint16_t nFilesOnCard
 
void lcdWriteNibble (uint8_t value)
 
void lcdWriteByte (uint8_t c, uint8_t rs)
 
void initializeLCD ()
 
 UI_STRING (ui_selected, UI_TEXT_SEL)
 
 UI_STRING (ui_unselected, UI_TEXT_NOSEL)
 
void getSDFilenameAt (uint16_t filePos, char *filename)
 
void sdrefresh (uint16_t &r, char cache[UI_ROWS][MAX_COLS+1])
 

Macro Definition Documentation

◆ INCREMENT_MIN_MAX

#define INCREMENT_MIN_MAX (   a,
  steps,
  _min,
  _max 
)    a = constrain((a + increment * steps), _min, _max);

◆ LCD_1LINE

#define LCD_1LINE   LCD_CONFIGURATION | 0x00

1 line display

◆ LCD_2LINE

#define LCD_2LINE   LCD_CONFIGURATION | 0x08

2 line display

◆ LCD_4BIT

#define LCD_4BIT   LCD_CONFIGURATION | 0x00

4 bits interface

◆ LCD_5X10

#define LCD_5X10   LCD_CONFIGURATION | 0x04

5 X 10 dots

◆ LCD_5X7

#define LCD_5X7   LCD_CONFIGURATION | 0x00

5 X 7 dots

◆ LCD_8BIT

#define LCD_8BIT   LCD_CONFIGURATION | 0x10

8 bits interface

◆ LCD_BLINKINGOFF

#define LCD_BLINKINGOFF   LCD_DISPLAYMODE | 0x00

Blinking off

◆ LCD_BLINKINGON

#define LCD_BLINKINGON   LCD_DISPLAYMODE | 0x01

Blinking on

◆ LCD_CLEAR

#define LCD_CLEAR   0x01

Clear screen

◆ LCD_CONFIGURATION

#define LCD_CONFIGURATION   0x20

Set function

◆ LCD_CURSORMOVE

#define LCD_CURSORMOVE   LCD_SHIFTMODE | 0x00

Cursor move

◆ LCD_CURSOROFF

#define LCD_CURSOROFF   LCD_DISPLAYMODE | 0x00

Cursor off

◆ LCD_CURSORON

#define LCD_CURSORON   LCD_DISPLAYMODE | 0x02

Cursor on

◆ LCD_DECREASE

#define LCD_DECREASE   LCD_ENTRYMODE | 0x00

Set cursor move direction – Decrease

◆ LCD_DISPLAYMODE

#define LCD_DISPLAYMODE   0x08

Set displaymode

◆ LCD_DISPLAYOFF

#define LCD_DISPLAYOFF   LCD_DISPLAYMODE | 0x00

Display off

◆ LCD_DISPLAYON

#define LCD_DISPLAYON   LCD_DISPLAYMODE | 0x04

Display on

◆ LCD_DISPLAYSHIFT

#define LCD_DISPLAYSHIFT   LCD_SHIFTMODE | 0x08

Display shift

◆ LCD_DISPLAYSHIFTOFF

#define LCD_DISPLAYSHIFTOFF   LCD_ENTRYMODE | 0x00

Display is not shifted

◆ LCD_DISPLAYSHIFTON

#define LCD_DISPLAYSHIFTON   LCD_ENTRYMODE | 0x01

Display is shifted

◆ LCD_ENTRYMODE [1/2]

#define LCD_ENTRYMODE   0x04

Set entrymode

◆ LCD_ENTRYMODE [2/2]

#define LCD_ENTRYMODE   0x04

Set entrymode

◆ LCD_HOME

#define LCD_HOME   0x02

Cursor move to first digit

◆ LCD_INCREASE

#define LCD_INCREASE   LCD_ENTRYMODE | 0x02

Set cursor move direction – Increase

◆ LCD_LEFT

#define LCD_LEFT   LCD_SHIFTMODE | 0x00

Left shift

◆ LCD_RIGHT

#define LCD_RIGHT   LCD_SHIFTMODE | 0x04

Right shift

◆ LCD_SETCGRAMADDR

#define LCD_SETCGRAMADDR   0x40

◆ LCD_SHIFTMODE

#define LCD_SHIFTMODE   0x10

Set shiftmode

◆ lcdCommand

#define lcdCommand (   value)    lcdWriteByte(value,0)

◆ lcdPutChar

#define lcdPutChar (   value)    lcdWriteByte(value,1)

◆ UI_MAIN

#define UI_MAIN   1

◆ UI_ROWS_EXTRA

#define UI_ROWS_EXTRA   0

Function Documentation

◆ beep()

void beep ( uint8_t  duration,
uint8_t  count 
)

◆ getSDFilenameAt()

void getSDFilenameAt ( uint16_t  filePos,
char *  filename 
)

◆ initializeLCD()

void initializeLCD ( )

◆ lcdWriteByte()

void lcdWriteByte ( uint8_t  c,
uint8_t  rs 
)

◆ lcdWriteNibble()

void lcdWriteNibble ( uint8_t  value)

◆ sdrefresh()

void sdrefresh ( uint16_t &  r,
char  cache[UI_ROWS][MAX_COLS+1] 
)

write file names at current position to lcd

◆ UI_STRING() [1/2]

UI_STRING ( ui_selected  ,
UI_TEXT_SEL   
)

◆ UI_STRING() [2/2]

UI_STRING ( ui_unselected  ,
UI_TEXT_NOSEL   
)

Variable Documentation

◆ currHeaterForSetup

TemperatureController* currHeaterForSetup
static

◆ nFilesOnCard

uint16_t nFilesOnCard

◆ PROGMEM

const int8_t encoder_table [16] PROGMEM = {4, 14, 21, 4, 4, 4, 28, 0}

◆ ui_autoreturn_time

millis_t ui_autoreturn_time = 0

◆ uid

UIDisplay uid